var http = require('http');

var postData = '{"woqu":"asd"}'

var options = {
    host: 'localhost',
        port: 8000,
        path: '/dgz',
        method: 'POST',
        headers: {
            'Content-Type': 'application/json',
            'Content-Length': postData.length
        }
    };


// 向服务端发送请求
var req = http.request( options , function (response) {
	console.log(response.statusCode);

    // 不断更新数据
    var body = '';
    response.on('data', function(data) {
        body += data;
    });

    response.on('end', function() {
        // 数据接收完成
        console.log(body);
    });


});

req.write(postData);
req.end();
